#ifndef __PREDICATE_H__
#define __PREDICATE_H__

#include <globalDecl.h>
#include <attribute.h>
#include <record.h>

using namespace std;

class Predicate 
{
	private:
		//Record * m_rPRecord; //will hold all values we are comparing
		list <Attribute> m_lAttList;
		int * m_iNumArray; //array of number
		int m_iCampareNumber; //number to compare
		int * m_iaComparison; //store = as 0, < as 1 and > as 2
		Schema * m_oPredSchema; //holds a copy of schema for cmparison and type use
		
		
	public:

		// this function goes to the specified text file and creates a 
		// selection predicate corresponding to the file
		Predicate (Schema &useMe, char *fNAme);

		~Predicate ();

		// returns 1 or TRUE if the predicate accepts the given record,
		// and returns a 0 or FALSE if the predicate does not accept the
		// given record
		int Apply (Record &toMe);
		void Print(Schema &mySchema);
}; 

#endif
